ArcGIS Runtime SDK for WPF - Library Reference
Lengths(IList<Graphic>,Nullable<LinearUnit>,Boolean) Method
See Also 
ESRI.ArcGIS.Client.Tasks Namespace > GeometryService Class > Lengths Method : Lengths(IList<Graphic>,Nullable<LinearUnit>,Boolean) Method

graphics
The graphics used to calculate lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the Spatial Reference of the geometry.
geodesic
If polylines are in geographic coordinate system, then geodesic needs to be set to true in order to calculate the ellipsoidal shortest path distance between each pair of the vertices in the polylines. The output if lengthUnit is not specified is returned in meters.
Calculates the lengths of each specified polyline.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Lengths( _
   ByVal graphics As IList(Of Graphic), _
   ByVal lengthUnit As Nullable(Of LinearUnit), _
   ByVal geodesic As Boolean _
) As List(Of Double)

Remarks

This overload has been replaced by a new overload replace bool geodesic with CalculationType.Geodesic for true and CalculationType.Planar for false.

Parameters

graphics
The graphics used to calculate lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the Spatial Reference of the geometry.
geodesic
If polylines are in geographic coordinate system, then geodesic needs to be set to true in order to calculate the ellipsoidal shortest path distance between each pair of the vertices in the polylines. The output if lengthUnit is not specified is returned in meters.

Return Value

Returns a collection of lengths of each polyline that was passed into the function. The result length will be in the unit of measurement indicated by the "lengthUnit" parameter. If no "lengthUnit" is passed then the result length will be expressed in the same units as the spatial reference.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.